package libs.yzx.zaza.acts2;

import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;

import libs.yzx.zaza.R;

/**
 * Created by Administrator on 2016/10/11
 */
public class Drawable2Activity extends AppCompatActivity {

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.act_drawable2);


        TextView tv = (TextView) findViewById(R.id.tv);

        Drawable d = getResources().getDrawable(R.mipmap.ic_launcher);
        d.setBounds(60,0,60+60,60);

        tv.setCompoundDrawables(d,null,null,null);

        tv.setCompoundDrawablePadding(60);

    }

}
